package cn.iocoder.yudao.module.system.controller.admin.mini.orderInfo.order.controller.admin.order.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
* 小程序-订单 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class OrderBaseVO {

    @Schema(description = "订单号", required = true)
    @NotNull(message = "订单号不能为空")
    private String orderCode;

    @Schema(description = "订单状态", example = "1")
    private Integer orderStatus;

    @Schema(description = "收货人地址信息", required = true)
    @NotNull(message = "收货人地址信息不能为空")
    private JslUserAddress address;

    @Schema(description = "物流信息")
    private OrderLogistic logistic;

    @Schema(description = "商品信息")
    private List<OrderGood> goods;

    @Schema(description = "支付状态1已支付2未支付", example = "2")
    private Integer payStatus;

    @Schema(description = "支付时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime payTime;

    @Schema(description = "最新发货时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime logisticTime;

    @Schema(description = "收货确认时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime confirmTime;

    @Schema(description = "下单时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime addTime;

    @Schema(description = "订单总价")
    private BigDecimal totalAmount;

    @Schema(description = "抵扣金额")
    private BigDecimal deduction;

}
